{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build:All",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_all",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Build:Binary",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_bin",
                "-c",
                "yes"
            ],
            "problemMatcher": [
                {
                    "applyTo": "allDocuments",
                    "owner": "cpp",
                    "severity": "warning",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^\"(.*)\",.line (\\d+):\\s+(remark)\\s+(.*):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "code": 4,
                        "message": 5
                    }
                },
                {
                    "applyTo": "allDocuments",
                    "owner": "cpp",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^\"(.*)\",.line (\\d+):\\s+(warning|error)\\s+(.*):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "severity": 3,
                        "code": 4,
                        "message": 5
                    }
                }
            ]
        },
        {
            "label": "Build:Binary verbose",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_bin",
                "-v",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Build:Documentation",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_docs",
                "-c",
                "yes"
            ],
            "problemMatcher": [
                {
                    "applyTo": "allDocuments",
                    "owner": "doxygen",
                    "severity": "warning",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):\\s+(warning):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "message": 4
                    }
                },
                {
                    "applyTo": "allDocuments",
                    "owner": "doxygen",
                    "severity": "error",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):\\s+(error):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "message": 4
                    }
                }
            ]
        },
        {
            "label": "Build:Unit test",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_unit_test",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Build:Unit test:Coverage",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "build_unit_test",
                "--coverage",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Configure",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "configure",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Clean:Binary",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "clean_bin",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Clean:Unit test",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "clean_unit_test",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Clean:All",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "clean_all",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Clean:Documentation",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "clean_docs",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {
            "label": "Clean:Distclean",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "distclean",
                "-c",
                "yes"
            ],
            "problemMatcher": []
        },
        {% if AXIVION_CONFIG is not none %}
        {
            "label": "Run:Axivion configuration",
            "type": "process",
            "group": "build",
            "command": "{{ AXIVION_CONFIG_EXE }}",
            "args": [
                "${workspaceFolder}/tests/axivion"
            ],
            "problemMatcher": []
        },
        {% endif %}
        {% if AXIVION_START_ANALYSIS is not none %}
        {
            "label": "Run:Axivion Analysis",
            "type": "process",
            "group": "build",
            "command": "{{ AXIVION_START_ANALYSIS }}",
            "problemMatcher": []
        },
        {% endif %}
        {% if AXIVION_START_DASHBOARD is not none %}
        {
            "label": "Run:Start Axivion Dashboard",
            "type": "process",
            "group": "build",
            "command": "{{ AXIVION_START_DASHBOARD }}",
            "problemMatcher": []
        },
        {% endif %}
        {
            "label": "Run:Guidelines and style guide check",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "check_guidelines",
                "-c",
                "yes"
            ],
            "problemMatcher": [
                {
                    "applyTo": "allDocuments",
                    "owner": "pylint",
                    "severity": "error",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):(\\d+):\\s+(.*):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "column": 3,
                        "code": 4,
                        "message": 5
                    }
                }
            ]
        {% if JFLASH|length >= 1 %}
        },
        {
            "label": "Flash:Binary",
            "type": "process",
            "group": "build",
            "command": "{{ WAF_WRAPPER_SCRIPT }}",
            "args": [
                "install_bin",
                "-c",
                "yes"
            ],
            "problemMatcher": [
                {
                    "applyTo": "allDocuments",
                    "owner": "cpp",
                    "severity": "warning",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^\"(.*)\",.line (\\d+):\\s+(remark)\\s+(.*):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "code": 4,
                        "message": 5
                    }
                },
                {
                    "applyTo": "allDocuments",
                    "owner": "cpp",
                    "fileLocation": [
                        "autoDetect",
                        "${workspaceFolder}"
                    ],
                    "pattern": {
                        "regexp": "^\"(.*)\",.line (\\d+):\\s+(warning|error)\\s+(.*):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "severity": 3,
                        "code": 4,
                        "message": 5
                    }
                }
            ]
        {% endif %}
        }
    ]
}
